#include<iostream>
#include<algorithm>
using namespace std;
const int maxn = 1006;
int r, n;
int x[maxn];
void solve() {
  int i=0, ans=0;
  while(i<n) {
    int s = x[i++];
    while(i<n && x[i]<=s+r)i++;
    int p = x[i-1];
    while(i<n && x[i]<=p+r)i++;
    ans++;
  }
  cout<<ans<<'\n';
  return;
}
int main() {
  while(cin>>r>>n) {
    if(r==-1)return 0;
    for(int i=0;i<n;++i)cin>>x[i];
    sort(x, x+n);
    solve();
  }
  return 0;
}